package com.kotlin.lib

data class Student(val name: String, val des: String, val age: Int, val address: String) {
    lateinit var other: String

    fun otherInitialized(): Boolean {
        return this::other.isInitialized
    }
}

/**
 *解构。顺序相关的。
 */
fun main() {
    val student = Student("zhangsan", "goodBoy", 12, "beijing")
//    val (name, _, age, address) = student
    println(student.otherInitialized())
//    println("name:$name, age=$age, address:$address")//

    val pair = Pair(0, "success")
    val (code, status) = pair
    println("$code $status")

    val triple = Triple(0, "message", "jsonData")
    val (statusCode, message, jsonData) = triple
    println("$statusCode $message $jsonData")

}